<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
<%

out.println("<br>Default="+java.util.Locale.getDefault());
out.println("<br>sessionLocale="+sessionLocale);

//String [] lang = java.util.Locale.getISOLanguages();
//String [] contry = java.util.Locale.getISOCountries();
//for(int i=0;i<lang.length;i++){
//out.println("<br>ISOLanguage "+i+"="+lang[i]);
//}
//for(int i=0;i<contry.length;i++){
//out.println("<br>con "+i+"="+contry[i]);
//}

java.util.Locale[] ls=java.util.Locale.getAvailableLocales();
out.println("<table border=1>");
out.println("<tr><td>local</td><td>DisplayName(locale)</td><td>getCountry()</td>");
out.println("<td>getDisplayCountry(locale)</td><td>getDisplayLanguage(locale)</td>");
out.println("<td>getDisplayVariant(locale)</td><td>getISO3Country()</td>");
out.println("<td>getISO3Language()</td><td>getVariant()</td>");
out.println("<td>getLanguage()</td></tr>");
for(int i=0;i<ls.length;i++){
out.println("<tr>");

out.println("<td>"+i+"="+ls[i] +"</td>");
out.println("<td>,<DisplayName(cn)/>"+ls[i].getDisplayName(sessionLocale) +"</td>");
out.println("<td>,<getCountry()/>"+ls[i].getCountry() +"</td>");
out.println("<td>,<getDisplayCountry(cn)/>"+ls[i].getDisplayCountry(sessionLocale) +"</td>");
out.println("<td>,<getDisplayLanguage(cn)/>"+ls[i].getDisplayLanguage(sessionLocale) +"</td>");
out.println("<td>,<getDisplayVariant(cn)/>"+ls[i].getDisplayVariant(sessionLocale) +"</td>");
out.println("<td>,<getISO3Country()/>"+ls[i].getISO3Country() +"</td>");
out.println("<td>,<getISO3Language()/>"+ls[i].getISO3Language() +"</td>");
out.println("<td>,<getVariant()/>"+ls[i].getVariant() +"</td>");
out.println("<td>,<getLanguage()/>"+ls[i].getLanguage() +"</td>");

out.println("</tr>");
}
out.println("</table>");

		
 %>
		<table border=1 width="500" align="center">
			<tr>
				<td align="center">
					<bean:message key="homepage.explain" />
					<form action="test.jsp">
 						<br>
						<bean:message key="homepage.please_chose_syslanguage" />
						:<mytag:select name="sysLanguage" locale="<%=sessionLocale.toString()%>" value="<%=sessionLocale.toString()%>" 
              				selectorName="com.kylin.common.selector.AllLanguageSelector"/>
						<br>
						<br>
						<bean:message key="homepage.please_chose_studylanguage" />
						:<mytag:select name="studyLanguage" locale="<%=sessionLocale.toString()%>" 
						       notEmpty="true" selectorName="com.kylin.common.selector.AllLanguageSelector"/>
						<br>
						<input type="submit" value="ok">
						<br>
		 				
					</form>
				</td>
			</tr>
		</table>
	</body>
</html>
